/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ttfsclient;

import java.net.ServerSocket;
import java.net.Socket;

/**
 *
 * @author Tidus Le
 */
public class clsThreadServer extends Thread
{
    int port;

    public clsThreadServer(int port) {
        this.port = port;
    }
    
    @Override
    public void run()
    {
        try
        {
            Socket client;
            ServerSocket SSocket = new ServerSocket(port);
            while(true)
            {
                client = SSocket.accept();
                (new clsThreadProcess(client)).start();
            }
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
    }
}
